﻿
using AutoUpdaterDotNET;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;


namespace MyAutoUpdater
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            //AutoUpdater.Start("https://rbsoft.org/updates/AutoUpdaterTest.xml");
            // 设置下载目录
            AutoUpdater.ReportErrors = true;
            AutoUpdater.DownloadPath = Environment.CurrentDirectory;
            AutoUpdater.Start("ftp://127.0.0.1/AutoUpdater2.xml", new NetworkCredential("open", "open"));
        }

        private void button1_Click(object sender, EventArgs e)
        {
            AutoUpdater.Start("ftp://rbsoft.org/updates/AutoUpdaterTest.xml", new NetworkCredential("FtpUserName", "FtpPassword"));
        }
    }
}
